package com.source.multithread.xml;

/**
 * @Author wengqy
 * @Date 2021/1/8
 */

//
public class XMLJSONDemo {
    public static void main(String[] args) {
        Student student = new Student(22, "weng", 55);
        String xml = XMLUtils.toXML(student);
     //   System.out.println(xml);// <?xml version="1.0" encoding="UTF-8" standalone="yes"?><message><id>22</id><name>weng</name><age>55</age></message>
         String xmlStu = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><message><id>22</id><name>weng</name><age>55</age></message>\n";
        Student ss = (Student) XMLUtils.toObject(xmlStu, Student.class);
        System.out.println(ss);
    }
}
